<?php

declare(strict_types=1);

namespace ImiApp\ApiServer\Api\Model\Base;

use Imi\Config\Annotation\ConfigValue;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Entity;
use Imi\Model\Annotation\Table;
use ImiApp\ImiServer\AbstractModel as Model;

/**
 * 通知评论 基类.
 *
 * @Entity(camel=false, bean=true, incrUpdate=false)
 * @Table(name=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\NoticeComment.name", default="fa_notice_comment"), usePrefix=false, id={"id"}, dbPoolName=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\NoticeComment.poolName"))
 * @DDL(sql="CREATE TABLE `fa_notice_comment` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `notice_id` int(10) unsigned DEFAULT NULL COMMENT '通知ID',
  `comment_id` int(10) unsigned DEFAULT NULL COMMENT '评论ID',
  `content` varchar(255) DEFAULT NULL COMMENT '评论内容',
  `images` varchar(255) DEFAULT NULL COMMENT '评论图',
  `time` int(11) DEFAULT NULL COMMENT '评论时间',
  `uid` int(11) DEFAULT NULL COMMENT '用户ID',
  `comment_uid` int(10) unsigned DEFAULT NULL COMMENT '被评论用户ID',
  `top_id` int(10) unsigned DEFAULT NULL COMMENT '顶层ID',
  `updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',
  `switch` tinyint(1) unsigned DEFAULT '0' COMMENT '开关',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='通知评论'", decode="")
 *
 * @property int|null $id 
 * @property int|null $noticeId 通知ID
 * @property int|null $commentId 评论ID
 * @property string|null $content 评论内容
 * @property string|null $images 评论图
 * @property int|null $time 评论时间
 * @property int|null $uid 用户ID
 * @property int|null $commentUid 被评论用户ID
 * @property int|null $topId 顶层ID
 * @property int|null $updatetime 更新时间
 * @property int|null $deletetime 删除时间
 * @property int|null $switch 开关
 */
abstract class NoticeCommentBase extends Model
{
    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEY = 'id';

    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEYS = ["id"];

    /**
     * id.
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $id = NULL;

    /**
     * 获取 id.
     *
     * @return int|null
     */
    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * 赋值 id.
     * @param int|null $id id
     * @return static
     */
    public function setId($id)
    {
        $this->id = null === $id ? null : (int)$id;
        return $this;
    }

    /**
     * 通知ID.
     * notice_id
     * @Column(name="notice_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $noticeId = NULL;

    /**
     * 获取 noticeId - 通知ID.
     *
     * @return int|null
     */
    public function getNoticeId(): ?int
    {
        return $this->noticeId;
    }

    /**
     * 赋值 noticeId - 通知ID.
     * @param int|null $noticeId notice_id
     * @return static
     */
    public function setNoticeId($noticeId)
    {
        $this->noticeId = null === $noticeId ? null : (int)$noticeId;
        return $this;
    }

    /**
     * 评论ID.
     * comment_id
     * @Column(name="comment_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $commentId = NULL;

    /**
     * 获取 commentId - 评论ID.
     *
     * @return int|null
     */
    public function getCommentId(): ?int
    {
        return $this->commentId;
    }

    /**
     * 赋值 commentId - 评论ID.
     * @param int|null $commentId comment_id
     * @return static
     */
    public function setCommentId($commentId)
    {
        $this->commentId = null === $commentId ? null : (int)$commentId;
        return $this;
    }

    /**
     * 评论内容.
     * content
     * @Column(name="content", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $content = NULL;

    /**
     * 获取 content - 评论内容.
     *
     * @return string|null
     */
    public function getContent(): ?string
    {
        return $this->content;
    }

    /**
     * 赋值 content - 评论内容.
     * @param string|null $content content
     * @return static
     */
    public function setContent($content)
    {
        $this->content = null === $content ? null : (string)$content;
        return $this;
    }

    /**
     * 评论图.
     * images
     * @Column(name="images", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $images = NULL;

    /**
     * 获取 images - 评论图.
     *
     * @return string|null
     */
    public function getImages(): ?string
    {
        return $this->images;
    }

    /**
     * 赋值 images - 评论图.
     * @param string|null $images images
     * @return static
     */
    public function setImages($images)
    {
        $this->images = null === $images ? null : (string)$images;
        return $this;
    }

    /**
     * 评论时间.
     * time
     * @Column(name="time", type="int", length=11, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $time = NULL;

    /**
     * 获取 time - 评论时间.
     *
     * @return int|null
     */
    public function getTime(): ?int
    {
        return $this->time;
    }

    /**
     * 赋值 time - 评论时间.
     * @param int|null $time time
     * @return static
     */
    public function setTime($time)
    {
        $this->time = null === $time ? null : (int)$time;
        return $this;
    }

    /**
     * 用户ID.
     * uid
     * @Column(name="uid", type="int", length=11, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $uid = NULL;

    /**
     * 获取 uid - 用户ID.
     *
     * @return int|null
     */
    public function getUid(): ?int
    {
        return $this->uid;
    }

    /**
     * 赋值 uid - 用户ID.
     * @param int|null $uid uid
     * @return static
     */
    public function setUid($uid)
    {
        $this->uid = null === $uid ? null : (int)$uid;
        return $this;
    }

    /**
     * 被评论用户ID.
     * comment_uid
     * @Column(name="comment_uid", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $commentUid = NULL;

    /**
     * 获取 commentUid - 被评论用户ID.
     *
     * @return int|null
     */
    public function getCommentUid(): ?int
    {
        return $this->commentUid;
    }

    /**
     * 赋值 commentUid - 被评论用户ID.
     * @param int|null $commentUid comment_uid
     * @return static
     */
    public function setCommentUid($commentUid)
    {
        $this->commentUid = null === $commentUid ? null : (int)$commentUid;
        return $this;
    }

    /**
     * 顶层ID.
     * top_id
     * @Column(name="top_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $topId = NULL;

    /**
     * 获取 topId - 顶层ID.
     *
     * @return int|null
     */
    public function getTopId(): ?int
    {
        return $this->topId;
    }

    /**
     * 赋值 topId - 顶层ID.
     * @param int|null $topId top_id
     * @return static
     */
    public function setTopId($topId)
    {
        $this->topId = null === $topId ? null : (int)$topId;
        return $this;
    }

    /**
     * 更新时间.
     * updatetime
     * @Column(name="updatetime", type="bigint", length=16, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $updatetime = NULL;

    /**
     * 获取 updatetime - 更新时间.
     *
     * @return int|null
     */
    public function getUpdatetime(): ?int
    {
        return $this->updatetime;
    }

    /**
     * 赋值 updatetime - 更新时间.
     * @param int|null $updatetime updatetime
     * @return static
     */
    public function setUpdatetime($updatetime)
    {
        $this->updatetime = null === $updatetime ? null : (int)$updatetime;
        return $this;
    }

    /**
     * 删除时间.
     * deletetime
     * @Column(name="deletetime", type="bigint", length=16, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $deletetime = NULL;

    /**
     * 获取 deletetime - 删除时间.
     *
     * @return int|null
     */
    public function getDeletetime(): ?int
    {
        return $this->deletetime;
    }

    /**
     * 赋值 deletetime - 删除时间.
     * @param int|null $deletetime deletetime
     * @return static
     */
    public function setDeletetime($deletetime)
    {
        $this->deletetime = null === $deletetime ? null : (int)$deletetime;
        return $this;
    }

    /**
     * 开关.
     * switch
     * @Column(name="switch", type="tinyint", length=1, accuracy=0, nullable=true, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $switch = 0;

    /**
     * 获取 switch - 开关.
     *
     * @return int|null
     */
    public function getSwitch(): ?int
    {
        return $this->switch;
    }

    /**
     * 赋值 switch - 开关.
     * @param int|null $switch switch
     * @return static
     */
    public function setSwitch($switch)
    {
        $this->switch = null === $switch ? null : (int)$switch;
        return $this;
    }

}
